package GUI;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.LayoutManager;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class GUI_page03_CustomerLogin extends JPanel {

	JLabel titleLabel;
	JButton returnButton;
	
	JLabel cidLabel;
	JTextField cidField;
	JLabel passLabel;
	JPasswordField passField;
	
	JLabel resultLabel;
	JButton loginButton;
	
	public GUI_page03_CustomerLogin() {
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		this.setBackground(Color.white);
		
		// title label
		titleLabel = new JLabel("Customer Login", JLabel.CENTER);
		titleLabel.setVerticalTextPosition(JLabel.CENTER);
		
		titleLabel.setHorizontalTextPosition(JLabel.CENTER);
		titleLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
		titleLabel.setFont(new Font("Century Gothic", Font.BOLD, 20));
		titleLabel.setForeground(Color.gray);
		this.add(titleLabel);
        
		this.add(Box.createRigidArea(new Dimension(0,15)));

        // return button
		returnButton = GUI_AMSStoreMain.makeGrayWhiteButton("Cancel", Component.LEFT_ALIGNMENT);
		this.add(returnButton);
        
        this.add(Box.createRigidArea(new Dimension(0,10)));
        
        // cid field
        cidLabel = GUI_AMSStoreMain.makeLeftAlignedGrayLabel("Customer ID", 11);
        this.add(cidLabel);
		cidField = GUI_AMSStoreMain.makeLeftGrayTextField("", 200);
		this.add(cidField);
		//page2ClerkPP_NameField.addActionListener(this);
		
		this.add(Box.createRigidArea(new Dimension(0,5)));
		
		// pass field
		passLabel = GUI_AMSStoreMain.makeLeftAlignedGrayLabel("Password", 11);
		this.add(passLabel);
		passField = GUI_AMSStoreMain.makeLeftGrayPassField(120);
		this.add(passField);
		//page2ClerkPP_DateField.addActionListener(this);
		
		this.add(Box.createRigidArea(new Dimension(0,10)));
		
		// result label
		resultLabel = GUI_AMSStoreMain.makeLeftAlignedGrayLabel("", 11);
        this.add(resultLabel);

		this.add(Box.createRigidArea(new Dimension(0,15)));

        // final continue button
        loginButton = GUI_AMSStoreMain.makeGrayWhiteButton("Login", Component.LEFT_ALIGNMENT);
        this.add(loginButton);
	}
}
